import App from './containers/Root'
import configureStore from './store/configureStore'

function requireAll(requireContext) {
  return requireContext.keys().map(requireContext);
}

function requireAllAsObject(requireContext) {
  return requireContext.keys().reduce(function(all, each){
    var e = requireContext(each).default
    return {...e, ...all}
  }, {})
}
const REQUEST_ERROR_TYPE = 'REQUEST_ERROR_TYPE'

export {
  App,
  configureStore,
  requireAll, requireAllAsObject,
};

// export history from './utils/history'
export {deleteCookie,writeCookie,getCookie,getToken,removeToken} from './utils/cookies'
export createReducer from './utils/createReducer'
export {makeActionType,makeCallAPI,makeBaseApi,makeBaseActionType,bindAction} from './utils/reduxHelper'
export { Request ,callAPI} from './utils/request'
export {REQUEST_ERROR_TYPE} from './middlewares/api'
export i18n from './i18n'
